import { createApp } from "vue";
import { createPinia } from "pinia";
import { createRouter, createWebHistory } from "vue-router";
import { ConfigProvider } from "ant-design-vue";
import zhCN from "ant-design-vue/es/locale/zh_CN";
import App from "./App.vue";
import routes from "./routes";
import "./assets/iconfont/iconfont.css";
import "./index.scss";

const app = createApp(App);
const pinia = createPinia();

const router = createRouter({
  history: createWebHistory(),
  routes,
});

app.use(pinia);
app.use(router);

// 配置 Ant Design Vue
app.use(ConfigProvider, {
  locale: zhCN,
  theme: { token: { colorPrimary: "#ff4d4f" } },
});

app.mount("#root");
